Conversation
added 2 commits
April 9, 2026 08:01
… best practices (#77) - Add src/logger.ts: wrapper around client.app.log() with console fallback - Replace console.warn/info with structured log() in index.ts, embedder.ts, memory.ts - Log plugin version on initialization Implements Issue #77 suggestions: - Structured logging (client.app.log instead of console.warn/info) - Plugin version info on init
…eanup - Allow passing undefined to explicitly clear env vars - Fix test isolation issue where host LANCEDB_OPENCODE_PRO_EMBEDDING_MODEL was leaking into test environment causing false pass - Clear both EMBEDDING_MODEL and OPENAI_MODEL in affected test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/logger.tsas a wrapper aroundclient.app.log()with console fallback for early-boot messagesconsole.warn/console.infowith structuredlog()inindex.ts,embedder.ts,memory.tsChanges
New file
src/logger.ts- Structured logging module that:client.app.log()when SDK client is availableconsole.*when client is not yet initialized (early boot) or API failsservice: "lancedb-opencode-pro"for log filteringModified files
src/index.ts- Replaced 6console.warn/infocalls withlog(), added version logging on initsrc/embedder.ts- Replaced 5console.warn/infocalls withlog()src/tools/memory.ts- Replaced 1console.infocall withlog()Not included (out of scope)
src/store.tsandsrc/config.tsinternal infrastructure logs ([store],[config]prefixes) - these are internal system logs, not plugin API usageVerification